package com.example.demo.controller;

import javax.annotation.Resource;

import com.example.demo.service.DemoService;
import com.example.demo.service.TestService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
@RequestMapping("/test")
public class DemoController {
    @Resource
    private DemoService demoService;
    @Resource
    private TestService testService;

    @GetMapping("/1")
    public String test() {
      log.info(">>>> test");
      return testService.test();
    }

    @GetMapping("/2")
    public String test2() {
      log.info(">>>> test2");
      return demoService.query();
    }

}